package cn.antblog.jdk8.lambda;

public interface MyInterface {

    void testMethod();

}


class Demo{
    public static void main(String[] args) {
        //接口实现类的具体的对象
        /*MyInterface imff = new MyInterface() {
            @Override
            public void testMethod() {
                System.out.println("接口实现类的具体的对象方法！");
            }
        };
        imff.testMethod();*/
        MyInterface imf = () -> System.out.println("lambda表达式实现方法！");
        imf.testMethod();

    }


}


class MyClass implements  MyInterface{

    @Override
    public void testMethod() {
        System.out.println("我重写了接口中testMethod 方法！");
    }


}

